import { defHttp } from '@/utils/http/axios';

export function getCaptcha() {
  return defHttp.get({url: `/getCaptcha`});
}

export function getAdvPositionOptions() {
  return defHttp.get({url: `/common/adv/positions`});
}

export function getArticleCategoryOptions(params) {
  return defHttp.get({url: `/common/article/category`, params});
}

export function getUserOptions(data) {
  return defHttp.post({url: `/common/user/search`, data});
}

export function getAdminGroupOptions(data) {
  return defHttp.get({url: `/common/admin/group`, data});
}

export function getAdminMenusOptions(params) {
  const { type = 'all' } = params
  return defHttp.get({url: `/common/admin/menus${type ? '/' + type : ''}`});
}

export function getDashboard() {
  return defHttp.get({url: `/getDashboard`});
}
